//引入项目中全部的全局组件
import SvgIcon from './SvgIcon/index.vue'
import Pagination from './Pagination/index.vue'
import Catagory from './Category/index.vue'
//引入element-plus提供的全部图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//全局对象
const allGloablComponent = {SvgIcon,Pagination,Catagory};
console.log("-----",Object.keys(allGloablComponent));
// Object.keys(allGloablComponent).forEach((item)=>{
//     console.log("1234==",item);
// })
//对外暴露插件对象
export default {
    //务必叫做install方法
    install(app:any){
        //注册项目全部的全局组件
        Object.keys(allGloablComponent).forEach((key)=>{
            console.log("=======",key);
            app.component(key,allGloablComponent[key])
        })
        for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
          }
    }
}